<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    #box{
        background-color: skyblue;
        width: 700px;
        height: 250px;
        
    }
</style>
<body>
    <div id="box"></div>

    <script>
        const getTime=()=>{
             var box = document.getElementById('box')
        var time = new Date()
        var year = time.getFullYear()
        var month = time.getMonth()+1
        var day = time.getDate()
        var hour = time.getHours()>=10?time.getMinutes():'0'+time.getHours()
        var minute=time.getMinutes()>=10?time.getMinutes():'0'+time.getMinutes()
        var second=time.getSeconds()>=10?time.getSeconds():'0'+time.getSeconds()
        box.innerText=year+'年'+month+'月'+day+'日'+hour+':'+minute+':'+second

        }

        setInterval(getTime,1000)
       
    </script>   
</body>

</html>